package heterosetbis;

import java.util.Iterator;

public interface HeteroSet<E> extends Iterable<E> {
	
	/* Adds the specified element of the specified type to this set if it is not already
	present */
	<T extends E> boolean add(T elem);
	
	/* Returns true if this set contains the specified element of the specified type */
	<T extends E> boolean contains(T elem);
	
	/* Returns true if this set contains no elements */
	boolean isEmpty();
	
	/* Returns an iterator over the elements in this set */
	<T extends E> Iterator<T> iterator(Class<T> type);
	
	<T extends E> Iterator<T> iteratorSubtype(Class<T> type);
	
	/* Removes the specified element of the specified type from this set if it is
	present */
	<T extends E> boolean remove(T elem);
	
	/* Returns the number of elements in this set */
	int size();
	
}